﻿using System;
using System.Collections.Generic;
using System.Drawing;
using System.IO;

namespace LabyCLI.Commands
{
	class cmd_mkdir
	{
		Terminal frm = Terminal.Instance;

		public void Main(List<string> args)
		{
			foreach (string arg in args)
			{
				if (!Directory.Exists(arg))
				{
					Directory.CreateDirectory(arg);

					if (Directory.Exists(arg))
					{
						Terminal.WriteLine("The directory: '" + arg + "' was succesfully created." + Environment.NewLine);
					}
				}
				else
				{
					Terminal.WriteLine("The directory: '" + arg + "' already exists." + Environment.NewLine, Properties.Settings.Default.Terminal_ErrorForeColor);
				}
			}
		}
	}
}
